<?php $ArPositions = Dracosys::getSessionValue(SESSION_INTERFACE, 'PositionList'); ?>
<section id="PositionList">
<h2>Listagem de Fun&ccedil;&otilde;es</h2>
    <table id="PositionList_positions" class="list">
        <thead>
            <tr>
                <th>Fun&ccedil;&atilde;o</th>
                <th>N&uacute;mero de Usu&aacute;rios</th>
                <th>N&uacute;mero de Perfis</th>
                <th>Visualizar</th>
                <th>Editar</th>
                <th>Deletar</th>
            </tr>
        </thead>
        <tfoot>
        </tfoot>
        <tbody>
            <?php foreach($ArPositions as $Position): ?>
                <tr>
                    <td><?=$Position->getStNome()?></td>
                    <td><?=$Position->countEmployees()?></td>
                    <td><?=$Position->countProfiles()?></td>
                    <td>
                        <a href="<?=DRA_URL?>funcao/visualizar-funcao/id/<?=$Position->getIDFuncao()?>"  title="Visualizar">
                            <img src="<?= DRA_VIEW_URL ?>images/descricao.png" />
                        </a>
                    </td>
                    <td>
                        <a href="<?=DRA_URL?>funcao/editar-funcao/id/<?=$Position->getIDFuncao()?>" title="Editar">
                            <img src="<?= DRA_VIEW_URL ?>images/edit.png" alt="Editar" />
                        </a>
                    </td>
                    <td>
                        <a href="<?=DRA_URL?>funcao/excluir-funcao/id/<?=$Position->getIDFuncao()?>" title="Excluir">
                            <img src="<?= DRA_VIEW_URL ?>images/delete.png" alt="Editar" />
                        </a>
                    </td>
                </tr>
            <?php endforeach; ?>
        </tbody>
    </table>
    <div class="insertInList">
        <a href="<?=DRA_URL?>funcao/cadastrar-funcao" class="insertIcon">Cadastrar nova Fun&ccedil;&atilde;o</a>
    </div>
</section>

